package de.eventdroid;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;

public class EventSearchScreen extends Activity {
	
	/* Loading dialog */
	ProgressDialog dialog;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.eventdroid_event_search);
    }
    
    /** Click Event Handler for the buttons on the Startscreen */
    public void onIndividualParameterSearch(final View view) {
    	switch (view.getId()) {
    	case R.id.btn_event_gps_search:
    		startActivity(new Intent(this, EventGPSSearchScreen.class));
    		break;
    	case R.id.btn_event_individual_search:
    		startActivity(new Intent(this, EventIndividualSearchScreen.class));    		
    		break;
    	}
    }
    
    /**
     * Creation Class for the menu
     */
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    	MenuInflater inflater = getMenuInflater();
    	inflater.inflate(R.menu.menu, menu);
    	return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    	
    	switch (item.getItemId()) {
    		case R.id.menu_startscreen:     
    			startActivity(new Intent(this, StartScreen.class));           	
    			break;
    	}
    	return true;
    }
    
}